<!DOCTYPE html>
<html lang="en">
<head>
    {include file="_public/_head"/}
</head>
<body>
{include file="_public/_header"/}
<div class="am-cf admin-main">
    {include file="_public/_sidebar"/}
    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">表格</strong> /
                    <small>Table</small>
                </div>
            </div>
            <hr>

            <div class="am-g">
                <div class="am-u-sm-12 am-u-md-6">
                    <div class="am-btn-toolbar">
                        <div class="am-btn-group am-btn-group-xs">
                            <a href="/admin/news/detail" type="button" class="am-btn am-btn-default">
                                <span class="am-icon-plus"></span> 新增
                            </a>
                        </div>
                    </div>
                </div>
            </div>

            <div class="am-g">
                <div class="am-u-sm-12">
                    <form class="am-form">
                        <table class="am-table am-table-striped am-table-hover table-main">
                            <thead>
                            <tr>
                                <th class="table-check"><input type="checkbox"/></th>
                                <th class="table-id">ID</th>
                                <th class="table-title">标题</th>
                                <th class="table-type">类别</th>
                                <th class="table-date am-hide-sm-only">添加日期</th>
                                <th class="table-date am-hide-sm-only">修改日期</th>
                                <th class="table-set">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo"}
                            <tr>
                                <td><input type="checkbox"/></td>
                                <td>{$vo.id}</td>
                                <td><a href="#">{$vo.title}</a></td>
                                <td>{$vo.type_name}</td>
                                <td class="am-hide-sm-only">{$vo.created_at}</td>
                                <td class="am-hide-sm-only">{$vo.updated_at}</td>
                                <td>
                                    <div class="am-btn-toolbar">
                                        <div class="am-btn-group am-btn-group-xs">
                                            <a href="/admin/news/detail?id={$vo.id}"
                                               class="am-btn am-btn-default am-btn-xs am-text-secondary"><span
                                                    class="am-icon-pencil-square-o"></span> 编辑</a>
                                            {if condition="$vo['status'] == 2"}
                                            <button class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span
                                                    class="am-icon-archive"></span> 显示
                                            </button>
                                            {else/}
                                            <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only">
                                                <span class="am-icon-archive"></span> 不显示
                                            </button>
                                            {/if}
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        <div class="am-cf">
                            <div class="am-fr">
                                {$list->render()}
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- content end -->
</div>
{include file="_public/_footer"/}
</body>
</html>